<%@ page contentType="text/html; charset=UTF-8"%>
<%@taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles"%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@ page language="java" import="java.util.*"%>
<%@ taglib prefix="s" uri="/struts-tags"%>

<!-- Header Nav -->
<header class="navbar navbar-inverse navbar-fixed-top bs-docs-nav"
	role="banner">
	<div class="container">
		<div class="navbar-header">
			<button class="navbar-toggle" type="button" data-toggle="collapse"
				data-target=".bs-navbar-collapse"></button>
			<s:a action="clickHomepage" cssClass="navbar-brand">E-Store</s:a>
		</div>
		<nav class="collapse navbar-collapse bs-navbar-collapse"
			role="navigation">
			<ul class="nav navbar-nav navbar-right">
				<s:if test="%{#session.username != null}">
					<li><a data-toggle="dropdown" href="#"> Wellcome <s:property
								value="#session.username" /> </a>
						<ul class="dropdown-menu" aria-labelledby="dropdownMenu1"
							role="menu">
							<li><s:a action="clickAdminPage">Admin Control Panel</s:a>
							</li>
							<li><s:a action="logout">Log Out</s:a>
							</li>
						</ul>
					</li>
				</s:if>
				<s:else>
					<li><a href="#" data-toggle="modal" data-target="#myModal">Login</a>
					</li>
					<li><s:a action="clickRegister">Register</s:a>
					</li>
				</s:else>
			</ul>
		</nav>
	</div>
</header>
<!-- Modal login -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog"
	aria-labelledby="myModalLabel" aria-hidden="true">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="row">
				<div class="col-md-11">
					<div class="col-md-12 text-center">
						<h1>Đăng Nhập</h1>
					</div>
					<s:form cssClass="form-horizontal" role="form" theme="simple"
						action="login">
						<div class="form-group">
							<label class="col-sm-3 control-label">Tài khoản</label>
							<div class="col-sm-9">
								<s:textfield cssClass="form-control" placeholder="Tài khoản"
									name="id"></s:textfield>
								<!-- 								<input type="text" class="form-control" placeholder="Tài khoản"> -->
							</div>
						</div>
						<div class="form-group">
							<label for="inputPassword3" class="col-sm-3 control-label">Mật
								khẩu</label>
							<div class="col-sm-9">
								<s:password cssClass="form-control" placeholder="Mật khẩu"
									name="password"></s:password>
								<!-- 								<input type="password" class="form-control" id="inputPassword3" -->
								<!-- 									placeholder="Mật khẩu"> -->
							</div>
						</div>
						<div class="form-group">
							<div class="col-sm-offset-2 col-sm-10 text-left">
								<div class="checkbox">
									<label> <input type="checkbox"> Nhớ tài khoản </label>
								</div>
							</div>
						</div>
						<div class="form-group">
							<div class="col-sm-12 text-center">
								<button type="submit" class="btn btn-default" onclick="this.login.reset();">Đăng Nhập</button>
							</div>
						</div>
						<div class="form-group">
							<div class="col-sm-12 text-center">
								<a href="#">Quên mật khẩu</a>
							</div>
						</div>
						<div class="form-group">
							<div class="col-sm-12 text-center">
								<s:a action="clickRegister">Đăng ký</s:a>
							</div>
						</div>
					</s:form>
				</div>
			</div>
		</div>
		<!-- /.modal-content -->
	</div>
	<!-- /.modal-dialog -->
</div>
<!-- /.modal -->
<!-- END MODAL LOGIN -->